$("button[name='delete_equipment']").click(function() {
	var uri = $(this).siblings('input').val();
	var dpComponentUri = $("input[name='dpcUri']").val();
	$.post('/ManEnv/ioDesignPattern/delete', {
		name : 'equipment',
		equipmentUri : uri,
		dpcUri : dpComponentUri,
		dataType: 'json',
	}, function(result) {
		alert("Delete:" + result.result);
	});
	// 找到tr,把整行删除
	$(this).parent().parent().parent().remove();
});

$("#view_io_device_info").click(function(){
	$("#dp_component_info_panel").modal('hide');
});

//详细信息
$("button[name='view_equipment']").click(function(){
	var uri = $(this).siblings('input').val();
	var dpComponentUri = $("input[name='dpcUri']").val();
     jQuery.ajax( {     
       type : 'POST',     
       contentType : 'application/json',
       data: JSON.stringify({name:'equipment', equipmentUri:uri, dpcUri:dpComponentUri}),
      // data: JSON.stringify(jsonStringList),
       url : '/ManEnv/ioDesignPattern/info',   
       dataType : 'json',
       success : function(result) {  
    	   $("#inner_equipment_info").text(result.inner_equipment_info);
    	   $("#bus_type_info").text(result.bus_type_info);
    	   $("#equipment_number_info").text(result.equipment_number_info);
       },     
       error : function() {
         alert("error!");     
       }     
     });
});